package com.songlanyun.modules.servicegoods.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.Date;

import com.songlanyun.common.drive.RootEntity;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;

/**
 * 平台的服务分类
 * 
 * @author wuchao
 * @email sunlightcs@gmail.com
 * @date 2020-12-15 11:51:34
 */
@Data
@TableName("yxt_service_goods_classify")
public class ServiceGoodsClassify extends RootEntity<Long, ServiceGoodsClassify> implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * 
	 */
	@TableId
	private Long id;
	/**
	 * 服务分类名称
	 */
	@NotBlank(message = "服务分类名称不能为空")
	@Length(min = 1, max = 50, message = "服务分类名称长度在1-50个字")
	private String name;
	/**
	 * 分类图标
	 */
	private String coverImage;
	/**
	 * 介绍
	 */
	@Length(min = 0, max = 500, message = "介绍长度在0-500个字")
	private String introduction;

	/**
	 * 顺序
	 */
	@Range(min = 0,max = 999999,message = "顺序值介于0到999999之间")
	private Integer orderIndex;
	/**
	 * 
	 */
	@TableField(fill = FieldFill.INSERT)
	private Date createTime;
	/**
	 * 
	 */
	@TableField(fill = FieldFill.INSERT_UPDATE)
	private Date updateTime;

	@Override
	public Long getIdentity() {
		return id;
	}
}
